1. Field of the Invention
The present invention relates to communication apparatuses, methods for controlling the same, and storage medium.
2. Description of the Related Art
In recent years, Near Field Communication (NFC), which is a short-range wireless communication technique that is compatible with RFID, has started to be implemented in mobile terminals such as a smartphone and a tablet computer. Three functions are defined with the NFC standard, namely a reader/writer function, a card emulation function, and an inter-device communication (peer-to-peer (P2P)) function. The reader/writer function is a function of performing reading and writing of data between NFC-compatible devices, such as NFC cards and NFC tags, and it is similar to an RFID (Radio Frequency IDentification) reader/writer. The card emulation function is a function of operating similarly to an NFC card or an NFC tag. The P2P function is a function of performing data exchange between NFC-compatible devices. A reader/writer is implemented in a mobile terminal equipped with an NFC function, and by using the implemented reader/writer, reading and writing of data can be performed between NFC cards, NFC tags, RFID tags, and the like.
In image forming apparatuses as well, an authentication function for performing control of whether or not to permit use of the apparatus by a user has previously been realized using RFID tags, but this function can be realized using NFC. Also, if an image forming apparatus is equipped with an NFC function, it is possible not only to use the reader/writer function to execute an authentication function such as that above, but it is also possible to use the card emulation function to perform communication with a mobile terminal equipped with the NFC function. According to this, information regarding the image forming apparatus, such as information regarding consumables (i.e., the amount of paper remaining in the paper feeding tray of the image forming apparatus), the processing status of print jobs being processed by the image forming apparatus, and setting information of the image forming apparatus, can be displayed on the mobile terminal.
With an apparatus that uses the NFC function, much less power is consumed in the case of using the card emulation function than in the case of using the reader/writer function and the P2P function. For this reason, with an apparatus that uses the NFC function, it can be said that it is desirable to perform control such that the card emulation function is used as much as possible so as to reduce power consumption.
For example, Japanese Patent Laid-Open No. 2011-60046 proposes a technique in which, according to the operation state of an information processing apparatus that includes an NFC device, the communication mode of the NFC device is switched between an operation mode for functioning as a reader/writer and an operation mode for functioning as an active tag. Specifically, the NFC device is operated in an active tag mode if the operation state of the information processing apparatus is a powered-off state or a power-saving state, and the NFC device is operated in a reader/writer mode if the operation state is a normal power state.
However, there is a trade-off between the amount of data that can be exchanged and power consumption in the case of using the card emulation function. For example, in the case of exchanging a large amount of data, a large-capacity buffer and energization of a circuit that performs communication control for exchanging large amounts of data are required, and therefore power consumption increases. On the other hand, in the case of using the card emulation function in an electromagnetic induction mode, the number of circuits that can be energized is limited, and therefore only a small amount of data can be exchanged. For this reason, with a device equipped with the NFC function, it is necessary to appropriately select the data that is to be exchanged when operating using the card emulation function.